package club.cearnach.web.controller.admin;

import club.cearnach.web.controller.BaseController;
import club.cearnach.api.service.*;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author 阮胜
 * @date 2018/5/16 22:30
 */
@Api(tags = "开发者测试控制类")
@Controller
@RequestMapping("/admin/develop")
@Slf4j
public class BackgroundDevelopController extends BaseController {
    private final IDevelopService developService;
    public BackgroundDevelopController(IActorService actorService, IAdminService adminService, IDirectorService directorService, IMovieLanguageService movieLanguageService, IMovieService movieService, IMovieTypeService movieTypeService, IPersonService personService, IPlaceService placeService, IVisitorService visitorService, IDevelopService developService) {
        super(actorService, adminService, directorService, movieLanguageService, movieService, movieTypeService, personService, placeService, visitorService);
        this.developService = developService;
    }

    @GetMapping("/movie/random-name")
    @ResponseBody
    public Integer randomName() {
        return developService.randomMovieName();
    }
}
